<?php

use think\facade\Route;

//miss路由，定义404
// 首页
Route::group('index', function () {
    Route::get('/', 'index/index');
    Route::get('getCity', 'index/getCity');
    Route::get('geocoder', 'index/geocoder');
    Route::get('communal', 'index/communal');
    Route::get('about', 'index/about');
    Route::get('makeInfo', 'index/makeInfo')->middleware('verify');
    Route::get('getServiceList', 'index/getServiceList');
    Route::get('searchCity', 'index/searchCity');
});

// 登录
Route::group('login', function () {
    Route::post('miniAppletLogin', 'login/miniAppletLogin');
    Route::post('weiXinOauth', 'login/weiXinOauth');
});
// 公告
Route::group('news', function () {
    Route::get('info', 'News/info');
    Route::get('getList', 'News/getList');
});

// 发送短信验证码
Route::group('captcha', function () {
    Route::post('send', 'Captcha/send');
});

// 支付回调
Route::group('callback', function () {
});

// 文件上传
Route::group('uploads', function () {
    Route::post('uploadImage', 'uploads/uploadImage');
});
// 用户信息
Route::group('user', function () {
    Route::get('/', 'user/index'); // 用户信息
    Route::post('/miniAppletEdit', 'user/miniAppletEdit');
})->middleware('verify');

// 预约
Route::group('makeOrder', function () {
    Route::get('getOrderInfo', 'makeOrder/getOrderInfo');
    Route::get('getList', 'makeOrder/getList');
    Route::post('edit', 'makeOrder/edit');
    Route::post('submit', 'makeOrder/submit');
})->middleware('verify');
